package com.heima.tuozhan.day01.Master;

public class Demo1 {
    public static void main(String[] args) {
        Master master = new Master("王刚", 50, "华山");
        Master tuDi = new TuDi("张三", 30, master.getMp());
        Master tuSun = new TuSun("王五", 15, master.getMp());
        System.out.println("师傅:" + master.getName() + " " + master.getAge() + " " + master.getMp());
        master.skill();
        System.out.println("徒弟:" + tuDi.getName() + " " + tuDi.getAge() + " " + tuDi.getMp());
        tuDi.skill();
        System.out.print("徒孙:" + tuSun.getName() + " " + tuSun.getAge() + " " + tuSun.getMp());
        tuSun.skill();
    }

}
